package com.edgar.paysdk.wechat

import com.edgar.paysdk.PaySdk
import com.edgar.paysdk.PayType

import android.app.Activity
import android.content.Intent
import android.os.Bundle

/**
 * WeChat pay handler activity
 */
open class WXPayHandlerActivity : Activity() {

    private val mWeChatPay = PaySdk.getPay<WeChatPay>(PayType.WeChat)

    public override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        mWeChatPay.handleIntent(this, intent)
    }

    override fun onNewIntent(intent: Intent) {
        super.onNewIntent(intent)
        setIntent(intent)
        mWeChatPay.handleIntent(this, intent)
    }
}